/**
 * 
 */
package org.xlab.baseframework.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.xlab.baseframework.domain.enumerate.EnumMessageType;
import org.xlab.baseframework.domain.enumerate.EnumReadIndentifying;
import org.xlab.baseframework.system.Declare;

/**
 * @author MaKuBEX
 * 
 */
@Entity
@Table(name = "T_SYS_MSG")
public class SystemMessage extends AbstractNormalVersionControlDomainObject {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = 2493193410142532701L;

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = Declare.DEFAULT_SYSTEM_DB_SEQUENCE)
	@SequenceGenerator(name = Declare.DEFAULT_SYSTEM_DB_SEQUENCE, sequenceName = Declare.DEFAULT_SYSTEM_DB_SEQUENCE, allocationSize = 1, initialValue = 0)
	@Column(name = "ID_")
	private Long id;
	@Column(name = "MESSAGE_", nullable = false, length = 140)
	private String message;
	@Column(name = "START_DATE")
	private Date startDate;
	@Column(name = "END_DATE")
	private Date endDate;
	@Column(name = "DESTINATION_", length = 200)
	private String destination;
	@Enumerated(value = EnumType.ORDINAL)
	@Column(name = "TYPE_")
	private EnumMessageType type;
	@Column(name = "CREATED_BY_NAME")
	private String createdByName;
	@Column(name = "LASTUPDATED_BY_NAME")
	private String lastUpdatedByName;
	@Enumerated(value = EnumType.ORDINAL)
	@Column(name = "READ_IND")
	private EnumReadIndentifying readInd;
	@Column(name = "SERIAL_NUMBER", length = 64, nullable = false, unique = false)
	private String serialNumber;

	/**
	 * @return the createdByName
	 */
	public String getCreatedByName() {
		return createdByName;
	}

	/**
	 * @return the destination
	 */
	public String getDestination() {
		return destination;
	}

	/**
	 * @return the endDate
	 */
	public Date getEndDate() {
		return endDate;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the lastUpdatedByName
	 */
	public String getLastUpdatedByName() {
		return lastUpdatedByName;
	}

	/**
	 * @return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * @return the readInd
	 */
	public EnumReadIndentifying getReadInd() {
		return readInd;
	}

	/**
	 * @return the serialNumber
	 */
	public String getSerialNumber() {
		return serialNumber;
	}

	/**
	 * @return the startDate
	 */
	public Date getStartDate() {
		return startDate;
	}

	/**
	 * @return the type
	 */
	public EnumMessageType getType() {
		return type;
	}

	/**
	 * @param createdByName
	 *            the createdByName to set
	 */
	public void setCreatedByName(String createdByName) {
		this.createdByName = createdByName;
	}

	/**
	 * @param destination
	 *            the destination to set
	 */
	public void setDestination(String destination) {
		this.destination = destination;
	}

	/**
	 * @param endDate
	 *            the endDate to set
	 */
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @param lastUpdatedByName
	 *            the lastUpdatedByName to set
	 */
	public void setLastUpdatedByName(String lastUpdatedByName) {
		this.lastUpdatedByName = lastUpdatedByName;
	}

	/**
	 * @param message
	 *            the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * @param readInd
	 *            the readInd to set
	 */
	public void setReadInd(EnumReadIndentifying readInd) {
		this.readInd = readInd;
	}

	/**
	 * @param serialNumber the serialNumber to set
	 */
	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

	/**
	 * @param startDate
	 *            the startDate to set
	 */
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(EnumMessageType type) {
		this.type = type;
	}

}
